package com.sy.util;

import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@EnableScheduling
public class MailCron {

    @Scheduled(cron = Const.Cron.ONEHOUR)
    public void cron() {
        IMAPMailUtil.receive();
        IMAPMailUtil.close();
    }
}
